//
//  UIButton+CXAdd.h
//  XiMaFM
//
//  Created by hcios on 2017/9/2.
//  Copyright © 2017年 hcios. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger, CX_ButtonEdgeInsetsStyle) {
    
    CX_ButtonEdgeInsetsStyleTop,    // image在上，title在下
    CX_ButtonEdgeInsetsStyleLeft,   // image在左，title在右
    CX_ButtonEdgeInsetsStyleBottom, // image在下，title在上
    CX_ButtonEdgeInsetsStyleRight   // image在右，title在左
};

@interface UIButton (CXAdd)

/**
 设置button的titleLabel和imageView的布局样式，及间距
 
 @param cx_style titleLabel和imageView的布局样式
 @param cx_space titleLabel和imageView的间距
 */
- (void)cx_layoutButtonWithEdgeInsetsStyle:(CX_ButtonEdgeInsetsStyle)cx_style
                           imageTitleSpace:(CGFloat)cx_space;

@end
